package com.mapler.neteller.service;

import com.mapler.ngfx.service.*;
import com.mapler.service.*;
import com.mapler.model.AdModel;
import com.mapler.model.SModel;
import com.mapler.model.UAModel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import org.apache.log4j.Logger;

/**
 *
 * @author none
 */
public class NetellerSignupWorker implements ITask {

    public ScheduledExecutorService executor = Executors.newScheduledThreadPool(10);
    private SModel sModel;
    private ArrayList<UAModel> uaModels;
    ArrayList<AdModel> addModels;
    private HashMap<String, UAModel> usHashMap;
    private static Logger log = Logger.getLogger(NGFXSignupWorker.class);
    private INotifier iNotifier;

    public NetellerSignupWorker(INotifier iNotifier, SModel sModel) {
        this.sModel = sModel;
        this.iNotifier = iNotifier;
    }

    @Override
    public void update() {
        try {
            iNotifier.notify("Signup:: Going to start working.");
            executor.execute(new NetellerSignupClick(iNotifier, this.sModel));
        } catch (Throwable ex) {
            ex.printStackTrace();
            log.debug("Signup:: Error " + ex);
        }
    }

    @Override
    public void finish() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
